/**
 * 
 */
package com.finalist.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 用户发票台头信息
 * @author pengyb
 * @version 3.0
 */
@Entity
@Table(name = "xx_invoice_title")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_invoice_title_sequence")
public class InvoiceTitle extends BaseEntity
{

    private static final long serialVersionUID = -5894364021715530350L;

    /**
     * 发票台头类型
     */
    public enum InvoiceType
    {

        /** 个人 */
        person,

        /** 单位 */
        company
    }

    public enum SelectStatus
    {
        /** 未选择 */
        notselect,

        /** 选择 */
        select
    }

    /**
     * 发票开具方式，目前只有 普通发票（纸质）  发票 
     */
    public enum InvoiceOpenMethod
    {

        /** 普通纸质发票 */
        general,

        /** 普通电子发票 */
        generalElec,

        /** 增值税发票  */
        valueAdd
    }

    /**
     * 发票内容，目前只有 明细
     */
    public enum Content
    {
        /** 明细 */
        detail,
        /** 办公用品 */
        office,
        /** 电脑配件 */
        computer,
        /** 耗材 */
        consume

    }

    /** 用户编号 */
    private Long memberId;

    /** 发票台头类型,0-个人、1-单位 */
    private InvoiceType invoiceType = InvoiceType.person;

    /** 发票台头 */
    private String title;

    /** 发票内容，如：明细 */
    private Content content;

    /** 默认选择状态,0-未选择，1-选择 */
    private SelectStatus selectStatus = SelectStatus.notselect;

    /** 发票开具方式*/
    private InvoiceOpenMethod invoiceOpenMethod;

    @JsonProperty
    @Column(nullable = false)
    public Long getMemberId()
    {
        return memberId;
    }

    public void setMemberId(Long memberId)
    {
        this.memberId = memberId;
    }

    @JsonProperty
    @Column(nullable = false)
    public InvoiceType getInvoiceType()
    {
        return invoiceType;
    }

    public void setInvoiceType(InvoiceType invoiceType)
    {
        this.invoiceType = invoiceType;
    }

    @JsonProperty
    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    @JsonProperty
    public SelectStatus getSelectStatus()
    {
        return selectStatus;
    }

    public void setSelectStatus(SelectStatus selectStatus)
    {
        this.selectStatus = selectStatus;
    }

    @JsonProperty
    public InvoiceOpenMethod getInvoiceOpenMethod()
    {
        return invoiceOpenMethod;
    }

    public void setInvoiceOpenMethod(InvoiceOpenMethod invoiceOpenMethod)
    {
        this.invoiceOpenMethod = invoiceOpenMethod;
    }

    @JsonProperty
    public Content getContent()
    {
        return content;
    }

    public void setContent(Content content)
    {
        this.content = content;
    }
}
